/*******************************************************************************
*  Project      : Minigate Golfin                                 
*  Program ID   : home.js                                 
*  Description  : 클럽개별메인 
*
********************************************************************************
*  Program History                                                            
*  Date        Author    Description                                          
*  ----------  --------  -------------------------------------------------------- 
*  2012-06-20  이윤노    Created.  
*  2012-06-00  이윤노    Complete.  
*******************************************************************************/

jQuery(function($){
	
	// 검색타입
	function clsSearchType()
	{
		this._HTMLDom = null;
		this.listData = null;
		this.idx = null;		
		this._init();
	}
	
	clsSearchType.prototype = {
		_init: function(){
			var $layer = $("div#container section#main_content div.golf_board article.golf_board_search div.selectlayer:eq(0)");
			this._HTMLDom = {
				"$layer": $layer
				, "$element": $layer.find("ul li:first")
			}
			this.idx = 0;
			this.listData = [{
										"코드": ""
										, "코드명": "전체"
									},
									{
										"코드": "M"
										, "코드명": "매니저"
									},
									{
										"코드": "A"
										, "코드명": "일반회원"
									}];
			
			$layer.find("ul").empty();
			this.setList(this.listData);
			this._bind();
			
		}
		, _bind: function(){
			var thisClass = this;
			var $layer = this._HTMLDom["$layer"];
			
			$layer.find("p:eq(0)").click(function(event){
				event.preventDefault();
				if($layer.find("ul").css("display")=="block") $layer.find("ul").hide(300);
				else $layer.find("ul").show(300);
			});
			
			$layer.find("li").live("click",function(event){
				event.preventDefault();
				thisClass.setIdx($layer.find("li").index($(this)));
			});
		}
		, setList: function(thisData){
			this.listData = thisData;
			this.display();	
		}
		, display: function(){
			var $layer = this._HTMLDom["$layer"];
			var $element = this._HTMLDom["$element"];
			var thisClass = this;
			
			$layer.find("ul").empty();
			
			for(var i=0;i<this.listData.length;++i){
				$layer.find("ul").append($element.clone(true));	
			}
			
			$layer.find("li").each(function(n){
				$(this).find("a").html(thisClass.listData[n]["코드명"]);
			});
		}
		, setIdx: function(idx){
			var $layer = this._HTMLDom["$layer"];
			this.idx = idx;
			$layer.find("p:eq(0) a").html($layer.find("li a").eq(this.idx).html());
			$layer.find("ul").hide(300);
		}
		, $getSelect: function(){
			return this._HTMLDom["$layer"].find("ul");
		}
		, getValue: function(){
			return this.listData[this.idx]["코드"];
		}
	}
	
	// 검색어
	function clsSearchText()
	{
		this._HTMLDom = null;
		this._ERRMSG = {
			"_NOVALUE": "검색어를 입력해 주십시요."
		}
		this.errMsg = null;		
		this._init();
	}
	
	clsSearchText.prototype = {
		_init: function(){
			var $layer = $("div#container section#main_content div.golf_board article.golf_board_search :text");
			this._HTMLDom = {
				"$layer": $layer
			}
		}
		, getValue: function(){
			return this._HTMLDom["$layer"].val();
		}
		, setValue: function(val){
			this._HTMLDom["$layer"].val(val);
		}
		, isValid: function(){
			this.errMsg = null;
			
			if(this.getValue() == ""){
				this.errMsg = this._ERRMSG["_NOVALUE"];
				return false;
			}
			
			return true;
		}
		, getError: function(){
			return this.errMsg;
		}
		, focus: function(){
			this._HTMLDom["$layer"].trigger("focus");
		}		
	}	
	
	//검색정렬
	function clsSearchSort(){
		this._HTMLDom = null;
		this.idx = null;
		this.sort = null;
		this._init();	
	}
	
	clsSearchSort.prototype = {
		_init: function(){
			var $layer = $("div#container section#main_content article.board_list table thead th");
			this._HTMLDom = {
				"$layer": $layer	
				, "$sorts": $layer.find("span")
			}			
			$layer.find("span").css("cursor", "pointer");

			//this.sort = true; //true-desc, false-asc
		}	
		, $getBtnSort: function(){			
			return this._HTMLDom["$sorts"];
		}
		, setIdx: function(val){
			if(val == this.idx){
				this.sort = !this.sort;
			}	else {
				this.idx = val;
				this.sort = true;
			}
			this.display();			
		}
		, getValue: function(key){
			var rtnData = {
				"정렬키": this.idx
				, "정렬방향": (this.sort?"desc":"asc")
			}
			return rtnData[key];
		}
		, display: function(){			
			var $sorts = this._HTMLDom["$sorts"];
			var thisClass = this;
			
			$sorts.each(function(n){				
				$(this).removeClass("th_t");
				if(thisClass.idx==n) $(this).addClass("th_t");
			})			
		}
	}
	
	//회원목록
	function clsClubOutMember(){
		this._HTMLDom = null;
		this.listData = null;
		this.page = null;
		this.profileData= null;
		this._init();
	}
	
	clsClubOutMember.prototype = {
		_init: function(){
			var $layer  = $("div#container section#main_content article.board_list");
			this._HTMLDom = {
				"$layer": $layer	
				, "$element": $layer.find("table.clublist_w tbody tr.loop_odd:first")
			}
			$layer.find("table.clublist_w tbody").empty();	
			this.profileData = [];
			$layer.parent().find("div.round_box").remove();
		}
		, $getLayer: function(){
			return this._HTMLDom["$layer"];
		}
		, addProfile: function(idx, oneData){
			this.profileData[idx] = oneData;
		}
		, setList: function(thisData, page){			
			this.listData = thisData;
			this.page = page;
			this.display();
		}
		, display: function(){
			var $layer = this._HTMLDom["$layer"].find("table.clublist_w tbody");
			var $element = this._HTMLDom["$element"]
			var thisClass = this;
			
			$layer.empty();
			
			for(var i=0;i<this.listData.length;++i){
				$layer.append($element.clone(true));	
			}
			
			var num = this.getPagePerNum(); 
			
			$layer.find("tr").each(function(n){
				$(this).find("td:eq(1)").html(num--);
				$(this).find("td:eq(2) span.nickname").hover(function(event){
					_gf.showProfileLayer($(this), thisClass.profileData[n], "left", 0, $(this).height());
				}, function(event){
					_gf.objProfileLayer.hide();
				});							
				$(this).find("td:eq(2) span.nickname").html(thisClass.listData[n]["사용자정보"]["닉네임"]);
				$(this).find("td:eq(2) img").attr("src",_gf.filePath2Url(thisClass.listData[n]["사용자정보"]["이미지"])).error(function(){
					$(this).attr("src", _gf.getDefaultProfileImage());
				});;
				$(this).find("td:eq(3)").html(thisClass.listData[n]["회원구분"]);
				$(this).find("td:eq(4)").html(getFormatNumber(thisClass.listData[n]["게시글수"]));
				$(this).find("td:eq(5)").html(getFormatNumber(thisClass.listData[n]["댓글수"]));
				$(this).find("td:eq(6)").html(getFormatNumber(thisClass.listData[n]["방문수"]));
				$(this).find("td:eq(7)").html(getFormatDateYmd(thisClass.listData[n]["가입일"],"-"));
				$(this).find("td:eq(8)").html(getFormatDateYmd(thisClass.listData[n]["최종방문일"],"-"));
			});
		}
		, spinStart: function(){
			this._HTMLDom["$layer"].spin();
		}
		, spinEnd: function(){
			this._HTMLDom["$layer"].spin(false);
		}
		, $getCheckedData: function(){
			var $checkbox = this._HTMLDom["$layer"].find("table.clublist_w tbody input:checkbox");
			var userId=null;
			
			if($checkbox.filter(":checked").length > 0){
				userId = "";
			}
			
			for(var i=0;i<$checkbox.filter(":checked").length;++i){
				if(userId) userId += ",";
				var idx = $checkbox.index($checkbox.filter(":checked").eq(i));
				userId += this.listData[idx]["사용자정보"]["아이디"];
			}			
			return userId;	
		}
		, getPagePerNum: function(){
			var $page = this.page;
			return $page.getTotalCount() - ($page.getCountPerPage()*($page.getPage()-1));
		}
	}
	
	function clsMemberRole(){
		this._HTMLDom = null;
		this.listData = [{
									"코드": "M"
									, "코드명": "매니저"
								}
								,{
									"코드": "A"
									, "코드명":"일반회원"
								}];
		this.idx = null;
		this._init();
	}
	
	clsMemberRole.prototype = {
		_init: function(){
			var $layer = $("div#container section#main_content article.club_class dl.group dd div.selectlayer03");
			this._HTMLDom = {
				"$layer": $layer	
				, "$element": $layer.find("ul li:first")
			}
			this.idx=0;
			$layer.find("ul").empty();
			this.setList(this.listData);
		}
		, setList: function(thisData){
			this.listData = thisData;
			this.display();	
			this._bind();
		}
		, display: function(){
			var $layer = this._HTMLDom["$layer"];
			var $element = this._HTMLDom["$element"];
			var thisClass = this;
			
			$layer.find("ul").empty();
			
			for(var i=0;i<this.listData.length;++i){
				$layer.find("ul").append($element.clone(true));	
			}
			
			$layer.find("ul li").each(function(n){
				$(this).find("a").html(thisClass.listData[n]["코드명"]);
			})
			
		}
		, getValue: function(){
			return this.listData[this.idx]["코드"];
		}
		, _bind: function(){
			var $layer = this._HTMLDom["$layer"];
			var thisClass = this;
			
			$layer.find("p").click(function(event){
				if($layer.find("ul").css("display")=="block") $layer.find("ul").hide(300);
				else $layer.find("ul").show(300);
			});	
			
			$layer.find("li").click(function(event){
				$layer.find("p>a").html($(this).html());
				$layer.find("ul").hide(300);
				thisClass.idx = $layer.find("li").index($(this));
			});
		}
	}
	
	function clsComm()
	{
		this.clubOutMemberList = null;
		this.clubOutMemberListPageData = null;
		this.clubOutMemberListRequest = null;		
		
		this._init();
	}
	
	clsComm.prototype = {
		_init: function(){			
			this.clubOutMemberListRequest = {
				"동호회키": null
				, "페이지": null
				, "검색어": null
				, "검색종류": null
				, "정렬키":null
				, "정렬방향":null
			}
			
			this.clubOutMemberListPageData = {
				"전체수": null	
			}
		}	
//------------------------ 탈퇴회원목록조회------------------------//		
		, getClubOutMemberList: function(){			
			var thisClass = this;
		
			var szPage = this.clubOutMemberListRequest["페이지"];
			var szClubSeq = this.clubOutMemberListRequest["동호회키"];
			var szSearchType = this.clubOutMemberListRequest["검색종류"];
			var szSearchText = this.clubOutMemberListRequest["검색어"];
			var szSortType = this.clubOutMemberListRequest["정렬키"];
			var szSortOption = this.clubOutMemberListRequest["정렬방향"];
			
			// ajax 시작			
			//parameter setting and run
			_gf.ajax({
				"sid":"CL001",
				"servicename":"getMemberList",
				"listcount":10,
				"currpageno":szPage
			}, {
				  "clubSeq": szClubSeq
				  , "memberStatus": 0
				  , "memberRole": szSearchType
				  , "nickname":szSearchText
				  , "sortBy":szSortType
				  , "sortOption":szSortOption
			}, function(ret){
				
				// callback and mapping
				thisClass.clubOutMemberList = [];
			
				if(ret["msp"]["contents"]["items"]){
					
					thisClass.clubOutMemberListPageData = {
						"전체수": ret["msp"]["contents"]["@totalcount"]
					}
					
					if(!ret["msp"]["contents"]["items"].length){
						ret["msp"]["contents"]["items"] = new Array(ret["msp"]["contents"]["items"]);
					}
					
					for(var i=0;i<ret["msp"]["contents"]["items"].length;i++){
						var arr = [];
						var obj = ret["msp"]["contents"]["items"][i];
						
						//동호회목록
						thisClass.clubOutMemberList.push({
							"동호회키": _util.nvl(obj["clubSeq"])
							, "사용자정보": {
								"아이디": _util.nvl(obj["clubMemberUserInfo"]["userId"])
								, "닉네임": _util.nvl(obj["clubMemberUserInfo"]["nickname"])
								, "이미지": _util.nvl(obj["clubMemberUserInfo"]["path"]) + _util.nvl(obj["clubMemberUserInfo"]["saveFileName"])
							}
							, "회원구분": _util.nvl(obj["memberRoleName"])
							, "게시글수": _util.nvl(obj["myBoardCnt"])
							, "댓글수": _util.nvl(obj["myReplyCnt"])
							, "방문수": _util.nvl(obj["visitCount"])
							, "가입일": _util.nvl(obj["joinDate"])
							, "최종방문일": _util.nvl(obj["recentconnDate"])
						});
						
					}         
				}
				
				$(thisClass).trigger("evtFinishClubOutMemberList");
			});						
		}
		, getClubOutMemberListData: function(){
			return this.clubOutMemberList;
		}
		, getClubOutMemberListPageData: function(){
			return this.clubOutMemberListPageData;	
		}
		, setClubOutMemberListRequest: function(key, val){
			this.clubOutMemberListRequest[key] = val;	
		}
//------------------------ 탈퇴회원목록조회------------------------//
//------------------------ 등급변경------------------------//
		, UpdateMemeberRole: function(arg){	
			var thisClass = this;		
			var szClubSeq = arg["동호회키"];
			var szUserId = arg["아이디"];
			var szRole = arg["회원권한"]
			
			// ajax 시작			
			//parameter setting and run
			_gf.ajax({
				"sid":"CL001",
				"servicename": "changeMemberRole"
			}, {
				"clubSeq": szClubSeq
				, "userId": szUserId
				, "memberRole": szRole
			}, function(ret){				
				
				// callback and mapping
				var resData = {
					"응답코드": (ret["msp"]["contents"]["serviceResult"] == "00000"?true:false)
					, "메세지": _gf.getResultMsg(ret)
				}
				
				$(thisClass).trigger("evtFinishUpdateMemberRole", [resData]);				
			});			
		}
//------------------------ 등급변경------------------------//
//------------------------ 강제탈퇴------------------------//
		, UpdateUserClose: function(arg){	
			var thisClass = this;		
			var szClubSeq = arg["동호회키"];
			var szUserId = arg["아이디"];
			
			// ajax 시작			
			//parameter setting and run
			_gf.ajax({
				"sid":"CL001",
				"servicename": "withdrawClub"
			}, {
				"clubSeq": szClubSeq
				, "userId": szUserId
				
			}, function(ret){				
				
				// callback and mapping
				var resData = {
					"응답코드": (ret["msp"]["contents"]["serviceResult"] == "00000"?true:false)
					, "메세지": _gf.getResultMsg(ret,["강제"])
				}
				
				$(thisClass).trigger("evtFinishUpdateUserClose", [resData]);
				
			});
		}
//------------------------ 강제탈퇴------------------------//
//------------------------ 동호회양도------------------------//
		, UpdateClubTrans: function(arg){			
			var thisClass = this;
			var szClubSeq = arg["동호회키"];
			var szUserId = arg["아이디"];
		
			// ajax 시작			
			//parameter setting and run
			_gf.ajax({
				"sid":"CL001",
				"servicename": "requestClubTransfer"
			}, {
				"clubSeq": szClubSeq
				, "userId": szUserId
			}, function(ret){				
				
				// callback and mapping
				var resData = {
					"응답코드": (ret["msp"]["contents"]["serviceResult"] == "00000"?true:false)
					, "메세지": _gf.getResultMsg(ret)
				}
				
				$(thisClass).trigger("evtFinishUpdateClubTrans", [resData]);
				
			});
		}
//------------------------ 동호회양도------------------------//
	}
	
	function clsControl()
	{
		this.objComm = null;
		
		this.objClubInfo = null
		this.objRole = null;
		
		this.objClubOutMember = null;
		
		this.objSearchType = null;
		this.objSearchText = null;
		this.objSearchSort = null;
		
		this.objProfileList = null;
				
		this.club_seq = null;
		this.club_my = null;
	}
	
	clsControl.prototype = {
		_init: function(){
			var member_id = document.objUtil.getCookie("member_id");
			this.club_seq = document.objUtil.getParam("club_seq");
			this.club_my = (document.objUtil.getParam("club_my") == "Y") ? 1:0;
			
			if(!this.club_seq) document.location.href = "../club/club.html";
			
			if(!member_id) {
				if(confirm("로그인 후 이용하여 주세요.")){
					_gf.goLogin();						
				}else{
					document.location.href = "../club/club.html";
				}				
			}else if(!this.club_seq) {
				document.location.href = "../club/club.html";
			}
			
			this._preload();
			
			this.objComm = new clsComm();
			this.objClubOutMember = new clsClubOutMember();
			this.objClubOutMemberPage = new _gf.makePaging($("#idClubOutMemberListPage"), 10, 10);			
			this.objSearchType = new clsSearchType();
			this.objSearchText = new clsSearchText();
			this.objSearchSort = new clsSearchSort();
			this.objMemberRole = new clsMemberRole();
			
			this._beforeStart();
			this._bind();
		}
		, _preload: function(){
			_gf.spinStart();
		}
		, _beforeStart: function(){
			var thisClass = this;
			this._permitStart = {
				
			}
			
			$.ajax({
				url: "js/self_club_top.js"
				, dataType: "script"
				, async: false
				, success: function(){
					
				}
				, error: function(){
					alert("error");
				}
			});
			
			_util.executeThread(function(){
				for(var k in thisClass._permitStart){
					if(!thisClass._permitStart[k]) return false;
				}
				
				return (_clubControl.getClubInfo().infoData);
			}, function(){				
				_gf.spinEnd();;
				thisClass._start();
			});	
		}
		, _role: function(){
			if(!this.objRole.isMember()){
				alert(this.objRole.getError());
				document.location.href="home.html?club_seq="+this.infoData["동호회키"];
			}else if(!this.objRole.isAdmin()){
				alert(this.objRole.getError());
				document.location.href="home.html?club_seq="+this.infoData["동호회키"];
			}
		}
		, _start: function(){		
			this.objClubInfo = _clubControl.getClubInfo();
			this.objRole = new clsRole(this.objClubInfo.infoData);
			this._role();
			
			//탈퇴자목록 조회
			this.objComm.setClubOutMemberListRequest("동호회키", this.club_seq);
			this.objComm.setClubOutMemberListRequest("검색종류", this.objSearchType.getValue());
			this.objComm.setClubOutMemberListRequest("검색어", "");				
			
			this.objSearchSort.setIdx(0);
			this.objComm.setClubOutMemberListRequest("정렬키", this.objSearchSort.getValue("정렬키"));
			this.objComm.setClubOutMemberListRequest("정렬방향",this.objSearchSort.getValue("정렬방향"));
			
			
			this.objComm.setClubOutMemberListRequest("페이지", 1);
			this.objClubOutMemberPage.setPage(1);
			
			this.objClubOutMember.spinStart();
			this.objComm.getClubOutMemberList();
		}
		, _bind: function(){
			var thisClass = this;
			
			// 탈퇴자목록 조회 완료이벤트
			$(this.objComm).bind("evtFinishClubOutMemberList", function(){
				var thisData = thisClass.objComm.getClubOutMemberListData();
				var pageData = 	thisClass.objComm.getClubOutMemberListPageData();
				
				
				for(var i=0;i<thisData.length;++i){					
					_gf.getMemberInfo({
						"아이디": thisData[i]["사용자정보"]["아이디"]
						, "인덱스": i
						, "콜백": function(res, info, arg){
							thisClass.objClubOutMember.addProfile(arg["인덱스"], info);
						}
					});
				}
				
				// 페이지 부에 전체 수설정 				
				thisClass.objClubOutMemberPage.setTotalCount(pageData["전체수"]);
				thisClass.objClubOutMemberPage.display();
				
				thisClass.objClubOutMember.setList(thisData, thisClass.objClubOutMemberPage);				
				thisClass.objClubOutMember.spinEnd();
			});
			
			// 페이지이동 이벤트
			$(this.objClubOutMemberPage).bind("evtPageClick", function(){
				var thisPage = this.getPage();
				
				thisClass.objComm.setClubOutMemberListRequest("페이지", thisPage);
				thisClass.objClubOutMember.spinStart();
				thisClass.objComm.getClubOutMemberList();
			});
			
			//등급변경 완료이벤트
			$(this.objComm).bind("evtFinishUpdateMemberRole", function(event, resData){				
				_gf.spinEnd();					
				alert(resData["메세지"]);				
				if(resData["응답코드"]){
					thisClass.objClubOutMember.spinStart();
					thisClass.objComm.getClubOutMemberList();
				}			
			});
			
			//동호회양도 완료이벤트
			$(this.objComm).bind("evtFinishUpdateClubTrans", function(event, resData){
				_gf.spinEnd();			
				alert(resData["메세지"]);				
				if(resData["응답코드"]){											
					document.location.href = "home.html?club_seq" + thisClass.club_seq;
				}			
			});
			
			//강제탈퇴 완료이벤트
			$(this.objComm).bind("evtFinishUpdateUserClose", function(event, resData){
				alert(resData["메세지"]);				
				if(resData["응답코드"]){				
					_gf.spinEnd();					
					thisClass.objClubOutMember.spinStart();
					thisClass.objComm.getClubOutMemberList();
				}			
			});
			
			//수정 버튼 이벤트
			$("p.btn_center img").click(function(event){
				event.preventDefault();				
				document.location.href="club_admin_write.html?club_seq="+ thisClass.club_seq;
			});
			
			// 검색버튼 이벤트
			$("div#container section#main_content div.golf_board article.golf_board_search p.in_s").click(function(event){
				event.preventDefault();
				thisClass.objComm.setClubOutMemberListRequest("검색종류", thisClass.objSearchType.getValue());
				thisClass.objComm.setClubOutMemberListRequest("검색어", thisClass.objSearchText.getValue());
				thisClass.objComm.setClubOutMemberListRequest("페이지", 1);
				thisClass.objComm.setClubOutMemberListRequest("정렬", 0);
				
				thisClass.objClubOutMemberPage.setPage(1);				
				thisClass.objComm.getClubOutMemberList();
				thisClass.objClubOutMember.spinStart();
								
			});
			
			//정렬버튼 이벤트
			this.objSearchSort.$getBtnSort().click(function(event){
				var idx = thisClass.objSearchSort.$getBtnSort().index($(this));
				thisClass.objSearchSort.setIdx(idx);
				
				thisClass.objComm.setClubOutMemberListRequest("페이지", 1);
								
				thisClass.objComm.setClubOutMemberListRequest("정렬키", thisClass.objSearchSort.getValue("정렬키"));
				thisClass.objComm.setClubOutMemberListRequest("정렬방향",thisClass.objSearchSort.getValue("정렬방향"));
				
				thisClass.objClubOutMemberPage.setPage(1);				
				thisClass.objComm.getClubOutMemberList()
				thisClass.objClubOutMember.spinStart();
			});		
			
			//등급변경
			$("div#container section#main_content article.club_class dl.group dd a img[alt=등급변경]").click(function(event){
				var userId = thisClass.objClubOutMember.$getCheckedData();
				var role = thisClass.objMemberRole.getValue();
								
				if(!userId) {
					alert("회원을 선택해주세요.");
					return;
				}
				var submitData = {
					"동호회키": thisClass.club_seq
					, "아이디": userId	
					, "회원권한": role
				}
				_gf.spinStart();					
				thisClass.objComm.UpdateMemeberRole(submitData);
			});
			
			//동호회양도
			$("div#container section#main_content article.club_class dl.group dd a img[alt=동호회양도]").click(function(event){
				
				var userId = thisClass.objClubOutMember.$getCheckedData();				
				if(!userId) {
					alert("회원을 선택해주세요.");
					return;
				}else if(userId.split(",").length>1){
					alert("1명만 선택하여 주십시요.");	
					return;
				}
				
				var _url = "../popup/pop_club_supply.html?club_seq=" + thisClass.club_seq + "&user_id="+ userId;
				var winJoinClub = window.open(_url, "winJoinClub", "width=1024, height=570, scrollbars=no");
			});
			//강제탈퇴
			$("div#container section#main_content article.club_class dl.group dd a img[alt=강제탈퇴]").click(function(event){
				var userId = thisClass.objClubOutMember.$getCheckedData();
				if(!userId) {
					alert("회원을 선택해주세요.");
					return;
				}
				var submitData = {
					"동호회키": thisClass.club_seq
					, "아이디": userId	
				}
				_gf.spinStart();
				thisClass.objComm.UpdateUserClose(submitData);
			});
			
			// 체크박스
			this.objClubOutMember.$getLayer().on("click", "input:checkbox", function(){
				var n = thisClass.objClubOutMember.$getLayer().find("input:checkbox").index($(this));
				var c = $(this).prop("checked");
				
				if(n == 0){
					thisClass.objClubOutMember.$getLayer().find("input:checkbox").prop("checked", c);
				}else{
					c = !(thisClass.objClubOutMember.$getLayer().find("input:checkbox:gt(0):not(:checked)").length);
					
					thisClass.objClubOutMember.$getLayer().find("input:checkbox:eq(0)").prop("checked", c);
				}
			});
		}
		, clubTransRet: function(ret){			
			this.objClubOutMember.spinStart();
			this.objComm.getClubOutMemberList();
		}
		, clubClose: function(ret){
			if(ret){
				document.location.href=	"../club/club.html";
			}		
		}
		
	}
	
	document.objControl = new clsControl();
	document.objControl._init();	
});	